package com.kai.steering.data.service.entity.po;

import cn.hutool.core.bean.BeanUtil;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.kai.steering.data.service.entity.domainObject.AnswerJournalDO;
import lombok.*;

import java.io.Serializable;
import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@ToString
@EqualsAndHashCode(callSuper = false)
@TableName(value = "answer_journal")
public class AnswerJournal implements Serializable {

    private static final long serialVersionUID = 1L;
    @TableId(value = "id", type = IdType.ID_WORKER)

    private String id;
    private String questionId;
    private String answerId;
    private String userId;
    private String replyAnswer;
    private String userQuestionId;
    private String classificationId;
    private String replyAnswerDetails;
    private Date creationDatetime;
    private String founder;
    private Integer usable;
    private Date deleteDatetime;
    private double result;
    private String resultDetails;
    public AnswerJournal(AnswerJournalDO answerJournalDO) {
        this.convertAnswerJournal(answerJournalDO);
    }
    public AnswerJournal convertAnswerJournal(AnswerJournalDO answerJournalDO){
        BeanUtil.copyProperties(answerJournalDO, this);
        return this;
    }
}
